<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- saved from url=(0048)./OrderUserInfo.html -->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>
        榆林科技馆内容页
    </title>
    <link rel="stylesheet" type="text/css" href="../css/reset.css">
    <link rel="stylesheet" type="text/css" href="../css/main.css">
    <script type="text/javascript" src="./js/adddate.js"></script>
    <script src="../js/vue2.min.js"></script>
    <script src="../js/axios.min.js"></script>
    <script type="text/javascript" language="javascript">

        function isCardNo(card) {
            // 身份证号码为15位或者18位，15位时全为数字，18位前17位为数字，最后一位是校验位，可能为数字或字符X
            var cd = card.value;
            var reg = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/;
            if (reg.test(cd) === false) {
                card.value = "";
                alert("身份证输入不合法");
                return false;
            }
        }
    </script>
</head>
<body>
<form name="form1" method="post" action="./OrderUserInfo.html" id="form1">


    <script type="text/javascript">
        //<![CDATA[
        var theForm = document.forms['form1'];
        if (!theForm) {
            theForm = document.form1;
        }

        function __doPostBack(eventTarget, eventArgument) {
            if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
                theForm.__EVENTTARGET.value = eventTarget;
                theForm.__EVENTARGUMENT.value = eventArgument;
                theForm.submit();
            }
        }

        //]]>
    </script>


    <div class="main_box" id="vueVip">
        <div class="side_here">
            <p>
                <a href="./OrderUserInfo.html#" title="首页"></a>当前位置 &gt; <span>会员信息管理</span> &gt; <span>会员管理</span></p>
        </div>
        <div class="kong">
        </div>
        <!--公用位置导航结束-->
        <div class="cont_box" >
            <p class="title_bt">
                会员信息查询</p>
            <table class="table_list1" border="0" cellspacing="0" cellpadding="0">
                <tbody>
                <tr>
                    <td class="name">
                        姓名：
                    </td>
                    <td class="enter3">
                        <input name="txtUName" type="text" id="txtUName" class="input">
                    </td>
                    <td class="name">
                        身份证：
                    </td>
                    <td class="enter3">
                        <input name="txtUidentity" type="text" id="txtUidentity" onblur="isCardNo(this)" class="input">
                    </td>
                    <td class="name">
                        用户类型：
                    </td>
                    <td class="enter3">
                        <select name="ddlUtype" id="ddlUtype">
                            <option value="0">--请选择---</option>
                            <option value="1">个人用户</option>
                            <option value="2">团体用户</option>
                        </select>
                    </td>
                    <td>
                        <input type="button" name="Button1" value="查询" id="Button1"  onclick="conditionFind()" class="chaxun">
                    </td>
                </tr>
                </tbody>
            </table>
        </div>
        <!--表格选项-->
        <div class="cont_box">
            <p class="title_bt">
                会员信息列表</p>
            <table width="1060" border="0" cellpadding="0" cellspacing="0" class="table_list2">
                <tbody>
                <tr>
                    <th width="4%">
                        序号
                    </th>
                    <th width="7%">
                        姓名
                    </th>
                    <th width="15%">
                        身份证
                    </th>
                    <th width="8%">
                        电话
                    </th>
                    <th width="12%">
                        用户类型
                    </th>
                    <th width="12%">
                        团体名称
                    </th>
                    <th width="10%">
                        操作
                    </th>
                </tr>
                <tr v-for="(u,i) in users">
                    <td>
                        {{i+1}}
                    </td>
                    <td>
                        {{u.vUserName}}
                    </td>
                    <td>
                        {{u.vcId}}
                    </td>
                    <td>
                        {{u.vTelephone}}
                    </td>
                    <td>
                        {{u.vStyle}}
                    </td>
                    <td>
                        {{u.vTeamName}}
                    </td>
                    <td>
                        <a :href="'OrderUserEdit.html?vid='+u.vid"><button type="button" class="btn btn_an btn_config" title="编辑"></button></a>
                        <input type="submit" name="Repeater1$ctl07$btndel" value=""
                               @click="deleteVip(u.vid)" id="Repeater1_ctl07_btndel" title="删除"
                               class="btn btn_an btn_del">
                    </td>
                </tr>
                </tbody>
            </table>
            <!--页码开始-->
            <div class="pages" style="margin-top: 40px;">
                <ul class="yema">
                    <li style="border-left: none;">
                        <a id="Lbthead" class="pagebtn"
                           href="javascript:__doPostBack(&#39;Lbthead&#39;,&#39;&#39;)">首页</a></li>
                    <li>
                        <a id="Lbtpre" class="pagebtn"
                           href="javascript:__doPostBack(&#39;Lbtpre&#39;,&#39;&#39;)">上一页</a></li>
                    <li>
                        <a id="Lbtnext" class="pagebtn"
                           href="javascript:__doPostBack(&#39;Lbtnext&#39;,&#39;&#39;)">下一页</a></li>
                    <li>
                        <a id="Lbtend" class="pagebtn"
                           href="javascript:__doPostBack(&#39;Lbtend&#39;,&#39;&#39;)">尾页</a></li>
                    <div class="clear">
                    </div>
                </ul>
                <div class="searchPage">
                    <span class="page-sum">共<strong class="allPage">&nbsp;1
                    </strong>页</span>&nbsp;<span class="page-sum">第<strong class="allPage">&nbsp;1
                    </strong>页</span> <span class="page-go">跳转第
                        <input name="Txtpageno" type="text" id="Txtpageno" class="pagebtn" size="3"
                               onkeyup="this.value=this.value.replace(/[^\d\.]/g, &#39;&#39;)"
                               style="ime-mode: disabled">页</span>
                    <a id="BtngoPage" class="page-btn"
                       href="javascript:__doPostBack(&#39;BtngoPage&#39;,&#39;&#39;)">GO</a>
                </div>
                <div class="clear">
                </div>
            </div>
        </div>
    </div>

</form>
</body>
<script>
     vip= new Vue({
        el:"#vueVip",
        data:{
            users:[]
        },
        methods : {
            deleteVip: function (id) {
                if (window.confirm("是否确认删除")) {
                    axios.get("../vipServlet?action=deleteVip&vid=" + id).then(res => {
                        console.log(res.data);
                        if (res.data == "success") {
                            let index = this.manages.findIndex((ele) => {
                                return ele.id === id;
                            });
                            this.manages.splice(index, 1);
                        }
                    })
                }
            }
        }
    });

    function conditionFind() {
        var vName=document.getElementById("txtUName").value;
        var vcid=document.getElementById("txtUidentity").value;
        var type = document.getElementById("ddlUtype").value;
        var url="../vipServlet?action=conditionFind&vname="+vName+"&vcid="+vcid+"&type="+type;
        let params = new URLSearchParams();
        params.append('action' ,"conditionFind")
        params.append('vname',vName)
        params.append('vcid',vcid)
        params.append('type',type)
        axios.post("../vipServlet",params).then(res=>{
            console.log(res);
            vip.users=res.data;
        });
    }

    window.onload = init;
    // window.onbeforeunload = init;
    function init() {
        axios.get("../vipServlet?action=findAll").then(res=>{
            console.log(res);
            // alert(res.data)
            vip.users=res.data;
            console.log(vip.users)
        });
    }
</script>
</html>